home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 November
/
Macworld (1999-11).dmg
/
Shareware World
/
Utilities
/
User Interface
/
Golive [Font]
/
LaunchURL
/
Source
/
LaunchURL.c
< prev
next >
Wrap
C/C++ Source or Header
|
1998-08-18
|
715b
|
38 lines
/*********************************************************************\
LaunchURL.c
© Dan Crevier, 1998
Code for a OneClick extension to launch a URL
LaunchURL theURL
\*********************************************************************/
#include "OC Extension.h"
#include "ICTypes.h"
#include "ICAPI.h"
pascal void main(ExternalParameterRec *pXRef)
{
valueRec inURL;
ICInstance inst;
if (GetStringValue(pXRef, &inURL))
{
if (ICStart(&inst, '????') == noErr)
{
if (ICFindConfigFile(inst, 0, nil) == noErr)
{
long selStart = 0, selEnd = inURL.len;
ICLaunchURL(inst, "\p", inURL.p, inURL.len, &selStart, &selEnd);
}
ICStop(inst);
}
DisposeValue(pXRef, &inURL);
}
}